GtkStyle*
gtk_style_new (void)
{
+ GtkStyleContext *context;
+ GtkWidgetPath *path;
GtkStyle *style;
-
- style = g_object_new (GTK_TYPE_STYLE, NULL);
-
+
+ context = gtk_style_context_new ();
+ gtk_style_context_set_screen (context, gdk_screen_get_default ());
+
+ path = gtk_widget_path_new ();
+ gtk_widget_path_append_type (path, GTK_TYPE_WIDGET);
+ gtk_style_context_set_path (context, path);
+
+ style = g_object_new (GTK_TYPE_STYLE,
+ "context", context,
+ NULL);
+
+ g_object_unref (context);
+ gtk_widget_path_free (path);
+
return style;
}